#ifndef JSONCONFIGVIEW_H
#define JSONCONFIGVIEW_H

#include ".\configview.h"
#include <QTextEdit>

class JsonConfigView : public ConfigView
{
    Q_OBJECT
public:
    explicit JsonConfigView(QObject *parent = nullptr);
    ~JsonConfigView();

    QWidget* viewWidget() override;
    void updateConfig(const QJsonArray &config) override;
    QJsonArray getModifiedConfig() const override;
    void applyEdits() override;
    void resetToOriginal() override;

private:
    QWidget *m_view = nullptr;
    QTextEdit *m_jsonEdit = nullptr;
    QJsonArray m_currentConfig;
    QJsonArray m_originalConfig;
};

#endif // JSONCONFIGVIEW_H
